This forum is closed to new posts and
responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:
I did further research:
- Runtime.getRuntime.exec("/usr/bin/open /tmp/test.odt") -> works
- Runtime.getRuntime.exec("/usr/bin/open ""/tmp/test.odt""") -> does not work
- Runtime.getRuntime.exec({/usr/bin/open "/tmp/test.odt"}) -> does not work
So it depends on using " in the parameter of the command.
Question is: how do I write filenames having a space as parameter?
For example, I want to open the file "/tmp/test one.odt".
I tried the following:
- Runtime.getRuntime.exec({/usr/bin/open /tmp/test one.odt})
- Runtime.getRuntime.exec({/usr/bin/open /tmp/test\ one.odt})
- Runtime.getRuntime.exec({/usr/bin/open /tmp/test\\ one.odt})
- Runtime.getRuntime.exec({/usr/bin/open /tmp/test\\\\ one.odt})
without luck, neither of them works.
Any suggestions?
Feedback response number WEBB7L3MDH created by ~Zelda Nimnuplopetsi on 11/04/2008